<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--创建对象-->
<script>
    // people=new Object();
    // people.name="imi";
    // people.age="30";
    // document.write("name:"+people.name+",age:"+people.age);//Object定义方式 单一 每次只添加一个
    people={
        name:"imii",
        age:"25",
    };
    document.write("name:"+people.name+",age:"+people.age);//过程定义方式
    function people(name,age) {//函数定义方式
        this.name=name;
        this.age=age;
    }
    son=new people("张三","30");
    document.write("name:"+son.name+",age:"+son.age);
</script>
</body>
</html>